
<div th:fragment="yljg-modal">
<meta charset="UTF-8" />
<meta http-equiv="pragma" content="no-cache"></meta>
<meta http-equiv="cache-control" content="no-cache"></meta>
<meta http-equiv="expires" content="0"></meta>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script type="text/javascript">
var selectionId;
var layero;
function queryYljgForm() {
	$(layero).find("#yljgForm").datagrid("reload");
}

/**加载医疗机构信息*/
function initYljgTable(layerObj) {
    var isFwbQueryCondition = StoreCache.removeCache("isFwbQueryCondition"); //查询结果是否作为服务包的查询条件
	layero = layerObj;
	$(layero).find("#yljgForm")
			.datagrid(
					{
						idField : "PTJGID",
						uniqueId : "PTJGID",
						striped : true,
						toolbar : "#dgFormToolbarJg",
						columns : [ [ {
							field : "YLJGDM",
							width : 250,
							align : "center",
							title : "医疗机构代码"
						}, {
							field : "YLJGMC",
							width : 200,
							align : "center",
							title : "医疗机构名称"
						}, {
							field : "XZQHMC",
							width : 150,
							align : "center",
							title : "行政区划"
						}, {
							field : "JGJC",
							width : 150,
							align : "center",
							title : "机构简称"
						} ] ],
						pagination : true,
						contentType : "application/x-www-form-urlencoded; charset=UTF-8",
						sidePagination : "server",
						pageNumber : 1,
						pageSize : 10,
						fit : true,
						fitColumns : true,
						singleSelect : true,
						rownumbers : true,
						method : "post",
						url : contextRoot + "yljgxx/queryPage.service",
						onBeforeLoad : function(params)//加载之前回调 获取查询条件
						{
							params["YLJGMC"] = $(layero).find(".yljgmc").val();
							params["YLJGID"] = $(layero).find(".yljgid").val();
							params["XZQHDM"] = userInfo["JGXZQHDM"];
							//isFwbQueryCondition : 查询结果是否是作为服务包中的查询条件
							if(isFwbQueryCondition){
                                params["CXSJ"] = true; //查询上级
								params["JGLB"] = parent.userInfo.WSJGLBDM;
							}
							return params;
						},onLoadSuccess: function(data){ 
							/**选中已选行*/
							if(!StringUtils.isEmpty(selectionId)){
								$(layero).find("#yljgForm").datagrid("selectRecord",selectionId);
							}
						}
					});
		
	/**查询按钮*/
	$(layero).find("#queryButton").on("click", function(){
		queryYljgForm();
	});
}

</script>
<script type="text/html" id="yljgModal">
<div class="easyui-layout" fit="true" style="width: 100%;">
	<div region="north" style="border: none; overflow: hidden;">
		<!--<h4 class="h4-title" style="background: white; font-size: 28px;">-->
			<!--医疗机构信息列表-->
		<!--</h4>-->
	</div>
	<div region="center" style="border: none;">
	<div id="dgFormToolbar" style="background: white;">
		<table class="form-table" style="margin:0;padding:0;">
			<tr>
				<td class="td-text">机构名称：</td>
				<td class="td-content">
					<input class="yljgmc" name="YLJGMC" class="form-control" type="text"
						placeholder="机构名称">
					<input class="yljgid" name="YLJGID" style="display: none;">
				</td>
				<td class="td-text" style="text-align:center">
					<button class="btn btn-default" type="button" id="queryButton">查询</button>
				</td>
			</tr>
		</table>
	</div>
	<div class="easyui-layout" style="border: none;">
		<div region="center" style="border: none;height: 365px;">
			<table id="yljgForm">
			</table>
		</div>
	</div>
	</div>
</div>




</script>